package cloud.example.eureka_client.mapper;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;
import org.springframework.stereotype.Service;

/**
 * @author zjm
 * @date 2018/12/22.
 */
@Mapper
public interface CountMapper {
  @Select("SELECT count FROM count WHERE id = #{id}")
  Integer getCount(@Param("id") Integer id);

  @Update("UPDATE count SET count=#{count} WHERE id=#{id}")
  void updateCount(@Param("id") Integer id, @Param("count") Integer count);
}
